package com.jt.controller;

import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
//@CrossOrigin(value = "http://baidu.com")    //允许跨域访问.没有限定
@CrossOrigin    //允许所有其它网址
@RequestMapping("/web")
public class WebController {

    /**
     * URL: http://localhost:8080/web/hello
     * 类型: get
     * 返回值: String
     */
    @GetMapping("/hello")
    public String hello(){
        return "好好学习,天天向上";
    }


}
